package com.monster.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.monster.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface OrderSettingMapper extends BaseMapper<OrderSetting> {

    @Select("select  ORDERDATE,NUMBER,RESERVATIONS from t_ordersetting where  orderdate between #{beginDate} and #{endDate}")
    List<OrderSetting> findSettingDataByYearAndMonth(@Param("beginDate") String beginDate, @Param("endDate") String endDate);

    @Update("update t_ordersetting  set number= #{number}  where  orderdate= #{orderdate}")
    Boolean updateNumberByOrderdate(@Param("number") int number, @Param("orderdate") String orderdate);
}
